<script type="text/javascript">


function validate(rel)
{
	jConfirm('Can you confirm this?', 'Confirmation Dialog', function(r) {
		if(r==true){

			
			var url = "/admin/rates/delete/rate_id/"+rel+"/hotel_id/"+<?php echo $this->hotel_id;?>; 
	
			$(location).attr('href',url);

		}
		else
		{
		}
	});
}

</script>
<?php         
$this->title = "Rates";
$this->headTitle($this->title);
?>
<p><a href="<?php echo $this->url(array('controller'=>'rates', 
        'action'=>'add'));?>">Add new Rate</a></p>
<table id="box-table-a">
<tr>
    <th>Rate Category</th>
    <th>Rate basis</th>
    <th>Rate single</th>
    <th>Rate double</th>
    <th>Rate triple</th>
    <th>Rate from</th>
    <th>Rate to</th>
    <th>Aciton</th>
  
</tr>
<?php foreach($this->Rate_arr as $Rate) : ?>
<?php  //PRINT_R($newsletter);exit;?>
<?php // echo ($newsletter[0][0]);exit;?>
<tr>
    <td><?php echo  $Rate['rate_category'];?></td>
    <td><?php echo $Rate['rate_basis'] ;?></td>
    <td><?php echo $Rate['rate_single'] ;?></td>
    <td><?php echo $Rate['rate_double'] ;?></td>
    <td><?php echo $Rate['rate_triple'] ;?></td>
    <td><?php echo $Rate['rate_fromdate'] ;?></td>
    <td><?php echo $Rate['rate_todate'] ;?></td>
    <td>
        <a href="/admin/rates/edit?rate_id=<?php echo $Rate['rate_id'] ?> & hotel_id=<?php echo $this->hotel_id;?>">Edit</a>
        <a rel="<?php echo $Rate['rate_id'];?>" onclick="validate(this.rel)" href="#">Delete</a>
    </td>
</tr>
<?php endforeach; ?>
</table>

